home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Blender 2.49b / blender-2.49b-windows.exe / $_4_ / plugins / include / plugin.h < prev    next >
C/C++ Source or Header  |  2009-08-31  |  3KB  |  105 lines

  1. /* Copyright (c) 1999, Not a Number / NeoGeo b.v. 
  2.  * $Id: plugin.h 14463 2008-04-18 19:10:03Z sirdude $
  3.  * 
  4.  * All rights reserved.
  5.  * 
  6.  * Contact:      info@blender.org   
  7.  * Information:  http://www.blender.org
  8.  *
  9.  * Redistribution and use in source and binary forms, with or without
  10.  * modification, are permitted provided that the following conditions
  11.  * are met:
  12.  * 1. Redistributions of source code must retain the above copyright
  13.  *    notice, this list of conditions and the following disclaimer.
  14.  * 2. Redistributions in binary form must reproduce the above copyright
  15.  *    notice, this list of conditions and the following disclaimer in the
  16.  *    documentation and/or other materials provided with the distribution.
  17.  *
  18.  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  19.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  20.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  21.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  22.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  23.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  24.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  25.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  26.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  27.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  28.  * SUCH DAMAGE.
  29.  */
  30.  
  31. #ifndef PLUGIN_H
  32. #define PLUGIN_H
  33.  
  34. #include "externdef.h"
  35. #include "iff.h"
  36. #include "util.h"
  37. #include "floatpatch.h"
  38.  
  39. #define B_PLUGIN_VERSION    6
  40.  
  41. typedef    int (*TexDoit)(int, void*, float*, float*, float*, float*);
  42. typedef    int (*TexDoitold)(int, void*, float*, float*, float*);
  43. typedef void (*SeqDoit)(void*, float, float, int, int, ImBuf*, ImBuf*, ImBuf*, ImBuf*);
  44.  
  45. typedef struct VarStruct {
  46.     int type;
  47.     char name[16];
  48.     float def, min, max;
  49.     char tip[80];
  50. } VarStruct;
  51.  
  52. typedef struct _PluginInfo {
  53.     char *name;
  54.     char *snames;
  55.  
  56.     int stypes;
  57.     int nvars;
  58.     VarStruct *varstr;
  59.     float *result;
  60.     float *cfra;
  61.  
  62.     void (*init)(void);
  63.     void (*callback)(int);
  64.     TexDoit tex_doit;
  65.     SeqDoit seq_doit;
  66.  
  67.     void (*instance_init)(void *);
  68. } PluginInfo;
  69.  
  70. LIBEXPORT int plugin_tex_getversion(void);
  71. LIBEXPORT int plugin_seq_getversion(void);
  72. LIBEXPORT void plugin_getinfo(PluginInfo *);
  73.  
  74. /* *************** defines for button types ************** */
  75.  
  76. #define CHA    32
  77. #define INT    96
  78. #define FLO    128
  79.  
  80. #define TOG    (3<<9)
  81. #define    NUM    (5<<9)
  82. #define LABEL    (10<<9)
  83. #define NUMSLI    (14<<9)
  84. #define COL    (15<<9)
  85.  
  86. /* return values (bitfield like) for textures (DNA_texture_types.h) */
  87. #define TEX_INT         0
  88. #define TEX_RGB         1
  89. #define TEX_NOR         2
  90.  
  91. /* *************** API functions ******************** */
  92.  
  93.     /* derived from the famous Perlin noise */
  94. LIBIMPORT float hnoise(float noisesize, float x, float y, float z);
  95.     /* the original Perlin noise */
  96. LIBIMPORT float hnoisep(float noisesize, float x, float y, float z);
  97.  
  98.     /* soft turbulence */
  99. LIBIMPORT float turbulence(float noisesize, float x, float y, float z, int depth);
  100.     /* hard turbulence */
  101. LIBIMPORT float turbulence1(float noisesize, float x, float y, float z, int depth);
  102.  
  103. #endif /* PLUGIN_H */
  104.  
  105.